﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class GUI_MessageDetail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (Session["uid"] == null)
        {
            Response.Redirect("../GUI/Home.aspx");
        }
        else
        {
            string str = Request.QueryString.Get("id");
            HiddenMessID.Value = str;
            SqlConnection cn = ToolsDT.getConnect();
            SqlCommand cmd = new SqlCommand("sp_UpdateStatus", cn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@id", SqlDbType.Int).Value = int.Parse(str);
            cmd.ExecuteNonQuery();
            cmd.Dispose();
            cn.Close();
        }    
    }
}
